import service from '@/utils/request'
// 列表
export const standardSystemListApi = (dataForm: any) => {
	return service.get('/standardSystem/list', { params: dataForm })
}
// 删除
export const standardSystemDeletepi = (dataForm: any) => {
	return service.get('/standardSystem/delete', { params: dataForm })
}
// 分类字典
export const listCategoryAndLabelApi = (dataForm: any) => {
	return service.get('/standardSystem/listCategoryAndLabel', { params: dataForm })
}
// 新增
export const categorysaveOrSubmitApi = (dataForm: any) => {
	return service.post('/standardSystem/saveOrSubmit', dataForm)
}
// 编辑
export const categoryDetailApi = (dataForm: any) => {
	return service.get('/standardSystem/getDetailInfo', { params: dataForm })
}

export const publishApi = (data: any) => {
	return service.get('/standardSystem/publish?id=' + data)
}
export const cancelPublishApi = (data: any) => {
	return service.get('/standardSystem/cancelPublish?id=' + data)
}

// ===============主编单位--增删改======================
export const editorUnitListApi = (dataForm: any) => {
	return service.get('/standardSystem/editorUnit/list', { params: dataForm })
}
// 0 主编单位; 1 参编单位
export const editorUnitUpdateApi = (unitType: any, dataForm: any) => {
	return service.post(`/standardSystem/editorUnit/saveOrSubmit/${unitType}`, dataForm)
}
export const editorUnitDelApi = (dataForm: any) => {
	return service.get('/standardSystem/editorUnit/delete', { params: dataForm })
}

// ===============主要起草人===============
export const mainDrafterListApi = (dataForm: any) => {
	return service.get('/standardSystem/mainDrafter/list', { params: dataForm })
}
export const mainDrafterUpdateApi = (dataForm: any) => {
	return service.post(`/standardSystem/mainDrafter/saveOrSubmit`, dataForm)
}
export const mainDrafterDelApi = (dataForm: any) => {
	return service.get('/standardSystem/mainDrafter/delete', { params: dataForm })
}

// ===============主要审查人===============
export const reviewExpertsListApi = (dataForm: any) => {
	return service.get('/standardSystem/reviewExperts/list', { params: dataForm })
}
export const reviewExpertsUpdateApi = (dataForm: any) => {
	return service.post(`/standardSystem/reviewExperts/saveOrSubmit`, dataForm)
}
export const reviewExpertsDelApi = (dataForm: any) => {
	return service.get('/standardSystem/reviewExperts/delete', { params: dataForm })
}

// ===============条文===============
export const articleListApi = (dataForm: any) => {
	return service.get('/standardSystem/article/list', { params: dataForm })
}
export const articleUpdateApi = (dataForm: any) => {
	return service.post(`/standardSystem/article/saveOrSubmit`, dataForm)
}
export const articleDelApi = (dataForm: any) => {
	return service.get('/standardSystem/article/delete', { params: dataForm })
}

// ===============引用标准===============
export const referenceListApi = (dataForm: any) => {
	return service.get('/standardSystem/reference/list', { params: dataForm })
}
export const referenceUpdateApi = (dataForm: any) => {
	return service.post(`/standardSystem/reference/saveOrSubmit`, dataForm)
}
export const referenceDelApi = (dataForm: any) => {
	return service.get('/standardSystem/reference/delete', { params: dataForm })
}

// ===============应用项目===============
export const apListApi = (dataForm: any) => {
	return service.get('/standardSystem/applicationProject/list', { params: dataForm })
}
export const apUpdateApi = (dataForm: any) => {
	return service.post(`/standardSystem/applicationProject/saveOrSubmit`, dataForm)
}
export const apDelApi = (dataForm: any) => {
	return service.get('/standardSystem/applicationProject/delete', { params: dataForm })
}

export const GetLogListApi = (dataForm: any) => {
	return service.get('/standardSystem/listLog', { params: dataForm })
}

export const GetTotalListApi = () => {
	return service.get('/standardSystem/statistic')
}
